package logic

import (
	"context"
	"cp/models/mysql"

	"cp/cprpc/cprpc"
	"cp/cprpc/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type CollectionDelLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewCollectionDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CollectionDelLogic {
	return &CollectionDelLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *CollectionDelLogic) CollectionDel(in *cprpc.CollectionDelRequest) (*cprpc.CollectionDelResponse, error) {
	// todo: add your logic here and delete this line
	type coll mysql.Collection
	mysql.DB.Debug().Delete(&coll{})

	return &cprpc.CollectionDelResponse{}, nil
}
